#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int main()
{
    umask(0);
    //int fd = open("bite",O_WRONLY|O_CREAT|O_TRUNC,0666);
    int fd = open("bite",O_RDONLY);
    
    char buffer[64];
    memset(buffer,'\0',sizeof(buffer));

    read(fd,buffer,sizeof(buffer));
    printf("%s",buffer);

    //const char* s = "Linux so easy!\n";
    //write(fd,s,strlen(s));

    close(fd);
    return 0;
}


//int main()
//{
//   const char* s = "linux so easy!\n";
//
//    FILE* fp = fopen("bite","r");
//    //fwrite(s,strlen(s),1,fp);
//    char line[64];
//    memset(line,'\0',sizeof(line));
//    while(fgets(line,sizeof(line),fp)!=NULL)
//    {
//        fprintf(stdout,"%s",line);
//    }
//
//    fclose(fp);
//    return 0;
//}
